From eef39ded9c45f591c899cf1f3ecc8dbe6eba592d Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 30 Jun 2005 17:33:38 +0000 Subject: [PATCH] Make Topo! not crash on waypoints that don't contain a description. --- gpsbabel/tpg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gpsbabel/tpg.c b/gpsbabel/tpg.c index c30dec255..b0ecaba80 100644 --- a/gpsbabel/tpg.c +++ b/gpsbabel/tpg.c @@ -185,7 +185,8 @@ tpg_read(void) stringsize = buff[0]; - tpg_fread(&buff[0], stringsize, 1, tpg_file_in); + if (stringsize) + tpg_fread(&buff[0], stringsize, 1, tpg_file_in); buff[stringsize] = '\0'; wpt_tmp->description = xstrdup(buff); -- 2.30.2